package com.example.smartcity_ikun3.ui.Smart.view

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.view.MenuItem
import com.example.smartcity_ikun3.R
import com.example.smartcity_ikun3.logic.util.Util.show
import kotlinx.android.synthetic.main.activity_smart_more_one_puls.*

class SmartMoreOnePlusActivity : AppCompatActivity() {


    val on1: Int = 1300
    val on3: Int = 1980
    val on4: Int = 3200
    val on6: Int = 5600
    val on7: Int = 1200

    val aon1: String = "药物"
    val aon3: String = "配专业资格医师"
    val aon4: String = "提供轮椅"
    val aon6: String = "护理"
    val aon7: String = "精神药物治疗"


    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        supportActionBar?.setDisplayHomeAsUpEnabled(true)
        setContentView(R.layout.activity_smart_more_one_puls)
        title = "评估结果"

        // 接收结果
        val n1 = intent.getStringExtra("one1")
        val n2 = intent.getStringExtra("one2")
        val n3 = intent.getStringExtra("one3")

        // 判断
        val rend = (1000..20000).random()
        val plus = "共计服务费用: $rend"
        Plus.text = plus
        val content = "配套服务: $n1,  $n2, $n3。"
        ContentPlus.text = content

    }


    override fun onOptionsItemSelected(item: MenuItem): Boolean {
        finish()
        return super.onOptionsItemSelected(item)
    }
}